package com.burnerpat.fl2d.core;

import java.util.LinkedList;
import java.util.List;

public class UpdatablePool
{
	private static List<IUpdatable> data = new LinkedList<IUpdatable>();
	
	public static void register(IUpdatable element)
	{
		data.add(element);
	}
	
	public static void performUpdates()
	{
		double stepSize = Clock.getStepSize();
		long tick = Clock.getLastFrame();
		
		for (IUpdatable x : data)
		{
			x.update(stepSize, tick);
		}
	}
}
